<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>贝塞尔曲线</title>
    <link rel="stylesheet" type="text/css" href="../css/reset.css" />
    <style>
      .container {
        margin-top: 200px;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      canvas {
        background: linear-gradient(
              -45deg,
              transparent 49%,
              rgba(0, 0, 0, 0.1) 49%,
              rgba(0, 0, 0, 0.1) 51%,
              transparent 51%
            )
            center no-repeat,
          repeating-linear-gradient(
              white,
              white 20px,
              transparent 20px,
              transparent 40px
            )
            no-repeat,
          linear-gradient(
            transparent,
            rgba(0, 0, 0, 0.06) 25%,
            rgba(0, 0, 0, 0.06) 75%,
            transparent
          );
        background-size: 100% 50%, 100% 50%, auto;
        background-position: 25%, 0, 0;
      }
      .coord {
        position: relative;
        height: 700px;
      }
      .coord .y {
        position: absolute;
        writing-mode: vertical-lr;
        transform: rotate(180deg);
        left: -20px;
        color: rgba(0, 0, 0, 0.6);
      }
      .coord .x {
        position: absolute;
        bottom: 224px;
        left: 4px;
        color: rgba(0, 0, 0, 0.6);
      }
      .control-point {
        position: absolute;
        z-index: 1;
        height: 20px;
        width: 20px;
        border: 1px solid rgba(0, 0, 0, 0.3);
        margin: -10px 0 0 -10px;
        outline: none;
        box-sizing: border-box;
        border-radius: 10px;
      }
      #p0 {
        top: 210px;
        left: 42px;
      }
      #p1 {
        bottom: 292px;
        right: 94px;
      }
      #bezierContainer {
        width: 300px;
        height: 600px;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="coord">
        <!-- <div class="y">(0%)</div> -->
        <div class="relative" id="bezierContainer">
          <canvas id="canvas"></canvas>
        </div>
        <!-- <div class="x">(0%)</div> -->
      </div>
    </div>
    <script type="module" src="./js/index.js"></script>
  </body>
</html>
